home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-01-12 | 1.0 KB | 25 lines | [TEXT/ToyS] |
- property theNames : ["One", "Two", "Three", "Four", "Five", "Six", "Seven"]
-
- dd install with grayscale -- font {name:"Espy Sans", size:12}
- set dlog to dd make dialog {size:[500, 120], contents:[¬
- {class:pict, bounds:[0, 0, 500, 120], contents:128}, ¬
- {class:push button, name:"OK", bounds:[20, 20, 120, 40]}, ¬
- {class:push button, name:"Cancel", bounds:[140, 20, 240, 40]}, ¬
- {class:push button, name:"Really Cancel", bounds:[300, 20, 410, 40]} ¬
- ], name:"Change Name & Bounds", style:standard window}
-
- set n to 1
- repeat
- try
- set dItem to dd interact with user for max ticks 20
- if dItem = 4 then exit repeat --if you hit the "Really Cancel" button
- dd set name of item 2 of dlog to (item n of theNames)
- dd set name of item 3 of dlog to (current date)'s time string
- dd set bounds of item 3 of dlog to [120 + n * 20, 12 + n * 8, 220 + n * 20, 32 + n * 8]
- set n to (n mod (length of theNames)) + 1
- on error --you can cancel with a command period if you're quick on the keys!
- exit repeat
- end try
- end repeat
- dd delete dlog
- dd uninstall